#include <vector>
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#ifndef _GFX_H_
#define _GFX_H_

struct xyindex
{
       int xp;
       int yp;
};

class sdlimg
{
public:
       SDL_Surface* image;
       xyindex position;
};
       

class output
{
public:
	int gfxinit(void);
	int setscreenmode(unsigned char,unsigned short,unsigned short);
	void updategfx(int,int);
	void cls(void);
	int getparameter(unsigned char);
    int pushimage(char*);
    int drawimage(int, int, int, int, int, SDL_Surface*, int, int, int);
    void flip(void);
    bool testcollisionsimple(unsigned short, unsigned short);  //block collision
    bool testcollisionprecise(unsigned short, unsigned short); //pixel-perfect collision  (Huge waste of CPU) NOT IMPLEMENTED YET
    bool textinit(void);
    int loadfont(char*,unsigned char);
    int printscr(unsigned char,char*,unsigned char,unsigned char,unsigned char,unsigned char,short,short);
protected:
    unsigned char bitdepth;
    unsigned short height;
    unsigned short width;
    std::vector<sdlimg> images;
    std::vector<TTF_Font*> fonts;
};
#endif
